# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=pd-lua
pkgver=0.11.6
pkgrel=1
pkgdesc="LUA embedding for pd"
arch=(loong64 x86_64)
url="https://github.com/agraef/pd-lua"
license=(GPL2)
groups=(pd-externals pro-audio)
depends=(gcc-libs glibc lua pd)
source=(https://github.com/agraef/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('463594ba3e55a74cc1824825f0d962f8a1741957316b65af9b50eaa34564b1ed71952d10bc90888f9f48be6526091b16730465804ef9fe4e6340a78ef998f452')
b2sums=('1627ed09a1d3c8f34294f5d1720d1561f5c08593c1dede446718258b94b22c340253f17a4b8185fe3ae3442d825edd35346c41551a2ffa5631291d1dfa79f1f6')

build() {
  make LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" -C $pkgname-$pkgver
}

package() {
  make DESTDIR="$pkgdir/" PDLIBDIR=/usr/lib/pd/extra prefix=/usr install -C $pkgname-$pkgver
  install -vDm 644 $pkgname-$pkgver/README -t "$pkgdir/usr/share/doc/$pkgname/"
}
